[#if ACTION!="context"#]
<table border="1" align="center" cellspacing="3" cellpadding="5" width="100%">
 <tr>
  <td valign="top" width="20%"[#if VIEW_MODE!=""#] bgcolor="#AAAAAA"[#endif#]><a href="?">Properties</a></td>
  <td valign="top" width="20%"[#if VIEW_MODE!="methods"#] bgcolor="#AAAAAA"[#endif#]><a href="?view_mode=methods">Methods</a></td>
  <td valign="top" width="20%"[#if VIEW_MODE!="scripts"#] bgcolor="#AAAAAA"[#endif#]><a href="?view_mode=scripts">Scripts</a></td>
  <td valign="top" width="20%"[#if VIEW_MODE!="timers"#] bgcolor="#AAAAAA"[#endif#]><a href="?view_mode=timers">Timers</a></td>
  <td valign="top" width="20%"[#if VIEW_MODE!="events"#] bgcolor="#AAAAAA"[#endif#]><a href="?view_mode=events">Events</a></td>
 </tr>
 <tr>
  <td valign="top" colspan=5>
  <div id="xrayContent">Loading...</div>
  </td>
 </tr>
</table>
<script language="javascript">
        var checkTimer;
        function checkAllStates() {
         clearTimeout(checkTimer);
         var url="?ajax=1&op=getcontent&view_mode=<#VIEW_MODE#>";
         $.ajax({
          url: url,
          }).done(function(data) { 
          $('#xrayContent').html(data);
          checkTimer=setTimeout('checkAllStates()', 5000);
         });
  return false;
 }

 checkAllStates();
</script>
[#endif ACTION#]

[#if ACTION="context"#]
<b>Related:</b>
<div id='contextBody'>...</div>
<script language="javascript">
 function findContext() {
  var url="/popup/xray.html?action=context";
  var bodyText='';
  [#if CODE_ID!=""#]bodyText=$('#[#CODE_ID#]').val();[#endif CODE_ID#]
  $.post(url, 
  { action:"context", ajax: "1", op: "process", keyword: "<#KEYWORD#>", type: "<#TYPE#>", body: bodyText},
   function(data) {
    $('#contextBody').html(data);
   }
  );
  return false;
 }
 findContext();
</script>
[#endif ACTION#]